package com.example.coffeeseller_2.utils;

/**
 * Created by WH on 2018/9/12.
 * 进制转换
 */

public class JinzhiSwitcher {

    //10进制转16进制
    public static String byte2Hex(byte b) {
        String hex = Integer.toHexString(b & 255);
        if(hex.length() == 1) {
            hex = '0' + hex;
        }

        return hex;
    }
}
